@switch($_GET['s'])
    @case(10)
        <a class="c-put pactchange j-choose" attr_data="{{$data->order_id}}" href="javascript:;">选择/上传合同</a>
		<a class="c-put orderdel j-delete"  href="javascript:;">下载合同</a>
		@switch($data->property)
            @case('detonate')
                <a class="c-put orderjmp j-jumper" href="javascript:cancel_contract('detonate','{{$data->order_id}}');">跳过</a>
                @break
            @case('poison')
                <a class="c-put orderjmp j-jumper" href="javascript:cancel_contract('poison','{{$data->order_id}}');">跳过</a>
                @break
            @default
                <a class="c-put orderjmp j-jumper" href="javascript:cancel_contract('normal','{{$data->order_id}}');">跳过</a>
        @endswitch
        <script type="text/javascript">
            var cancel_contract = function(type,order_id){
                if(type == 'detonate'){
                    layer.open({
                        title:'选择合同类型',
                        type: 1,
                        btn:["确定","取消"],
                        offset: 't',
                        // closeBtn: 0, //不显示关闭按钮
                        anim: 5,
                        area: ['640px', '200px'], //宽高
                        shadeClose: true, //开启遮罩关闭
                        content: $('.cancelcontract'),
                        yes:function(index, layero){
                            var contract_type = $('#cancel_contract_type').val();
                            if(contract_type == ''){
                                layer.msg('请选择合同类型',{icon:2,time:1500});
                                return false;
                            }
                            ajax_cancel_contract(order_id,contract_type);
                        }
                    });
                }
            }
            if(type == 'poison'){
                layer.msg('易制毒无法跳过合同',{icon:2,time:1500});
            }
            if(type == 'normal'){
                ajax_cancel_contract(order_id,'');
            }
            var ajax_cancel_contract = function(order_id,contract_type){
                $.ajax({
                    url: "/order/ajaxCancelContract",
                    type : "GET", 
                    dataType :"json",
                    data:'contract_type='+contract_type+'&order_id='+order_id,
                    success: function(data){
                        if(data == 1){
                            parent.location.reload();
                        }
                    },
                    error: function(data){
                        layer.msg('ERROR!',{icon:2,time:1500});
                    }
                });
            }
        </script>
        @break
    @case(20)
        <a class="c-put pactchange update_material" attr_data="{{$data->order_id}}" href="javascript:;">上传资料</a>
		<a class="c-put orderdel j-delete"  href="javascript:;">下载合同</a>
        <script type="text/javascript">
            $(".update_material").on('click',function(){
                var order_id = $(this).attr('attr_data');
                layer.open({
                    type:2,
                    title: '上传资料',
                    offset: 't',
                    area:['75%','90%'],
                    // btn:["确定","取消"],
                    content:'/order/uploadMaterial?id='+order_id, 
                    yes:function(index, layero){

                    }
                });
            })
        </script>
        @break

    @default
@endswitch